package org.springframework.test.beanDefinetionPostProcessor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.core.PriorityOrdered;
import org.springframework.stereotype.Component;

/**
 * [简要描述]:
 * [详细描述]:
 *
 * @author ZouHaiBo
 * @version 1.0, 2021/7/28 17:30
 * @since JDK 1.8
 */
@Component
public class PriorityBeanDefinitionPostProcessor implements BeanDefinitionRegistryPostProcessor, PriorityOrdered
{
	@Override
	public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException
	{
		System.out.println("===============PriorityBeanPostProcessor.postProcessBeanFactory===================");
	}

	@Override
	public int getOrder()
	{
		return 1;
	}

	@Override
	public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException
	{
		System.out.println("===============PriorityBeanPostProcessor.postProcessBeanDefinitionRegistry===================");

	}
}
